package cn.cy.dao.orclimpl;

import cn.cy.dao.BaseDao;
import cn.cy.dao.ClaimVoucherDetailDao;
import cn.cy.pojo.ClaimVoucherDetail;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository("claimVoucherDetailDao")
public class ClaimVoucherDetailDaoImpl extends BaseDao<ClaimVoucherDetail> implements ClaimVoucherDetailDao {
    public ClaimVoucherDetailDaoImpl(){}
    @Autowired
    public ClaimVoucherDetailDaoImpl(@Qualifier("sessionFactory") SessionFactory sessionFactory){
        setSessionFactory(sessionFactory);
    }
    @Override
    public List<ClaimVoucherDetail> findById(Long id) {
        return this.getHibernateTemplate().find("from ClaimVoucherDetail where mainId="+id);
    }
}
